package com.dotflat.staffExtend.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Entity
@Table(name = "ex_staff_extend_rank_log",
		uniqueConstraints = {
				@UniqueConstraint(columnNames = {
						"areaId",
						"rankCircleId",
						"staffId",
						"createdBy",
				})
		})
@Data
@EqualsAndHashCode(callSuper = true)
public class StaffExtendInfoRankLog extends AreableObjectBase {

	@Column(columnDefinition = "varchar(32)  COMMENT '员工id'")
	private String staffId;

	@Column(columnDefinition = "varchar(32)  COMMENT '评分周期id'")
	private String rankCircleId;

	@Column(columnDefinition = "varchar(32)  COMMENT '评分标签'")
	private String tags;

	@Column(columnDefinition = "varchar(512) COMMENT '图片地址'")
	private String resURLs;

	@Column(columnDefinition = "varchar(30) COMMENT '资源类型' ")
	private String resType;

	@Column(columnDefinition = "varchar(512)  COMMENT '内容'")
	private String content;

	@Column(columnDefinition = "int default 0   COMMENT '分数'")
	private Integer rankVal;

	@Column(columnDefinition = "int default 0   COMMENT '来源用户：  0:Staff    1:家长   2:学习记录   3:培训'")
	private Integer sourceType;

	@Column(columnDefinition = "varchar(32)  COMMENT '来源用户Id'")
	private String sourceId;

	@Column(columnDefinition = "varchar(32)  COMMENT '来源用户名字'")
	private String sourceName;

	@Column(columnDefinition = "varchar(512)  COMMENT '来源用户头像'")
	private String sourceHeadImgUrl;

	@Transient
	private String areaName;

	@Transient
	private String staffName;
}
